home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.19950528-19950726 / 000389_news@columbia.edu_Tue Jul 18 08:06:39 1995.msg < prev    next >
Internet Message Format  |  2020-01-01  |  3KB

  1. Received: from apakabar.cc.columbia.edu by watsun.cc.columbia.edu with SMTP id AA07776
  2.   (5.65c+CU/IDA-1.4.4/HLK for <kermit.misc@watsun.cc.columbia.edu>); Tue, 18 Jul 1995 15:43:25 -0400
  3. Received: by apakabar.cc.columbia.edu id AA27533
  4.   (5.65c+CU/IDA-1.4.4/HLK for kermit.misc@watsun); Tue, 18 Jul 1995 15:43:22 -0400
  5. Path: news.columbia.edu!news.cs.columbia.edu!news.nyc.pipeline.com!newsjunkie.ans.net!howland.reston.ans.net!news.nic.surfnet.nl!sun4nl!news.iaf.nl!news.vcd.nl!news
  6. From: harry@vcd.nl (Harry Venema)
  7. Newsgroups: comp.unix.programmer,comp.protocols.kermit.misc
  8. Subject: Re: dialing program; modem receives dialstring but doesn't dial?
  9. Date: 18 Jul 1995 08:06:39 GMT
  10. Organization: VCD Automatisering B.V, Groningen, the Netherlands
  11. Lines: 49
  12. Message-Id: <3ufq2f$1lh@vcd.nl>
  13. References: <3ue63g$g3n@cnj.digex.net>
  14. Nntp-Posting-Host: viper.vcd.nl
  15. Mime-Version: 1.0
  16. Content-Type: Text/Plain; charset=ISO-8859-1
  17. X-Newsreader: WinVN 0.99.5
  18. Xref: news.columbia.edu comp.unix.programmer:32383 comp.protocols.kermit.misc:3225
  19. Apparently-To: kermit.misc@watsun.cc.columbia.edu
  20.  
  21. In article <3ue63g$g3n@cnj.digex.net>, hashmi@cnj.digex.net says...
  22. >
  23. >
  24. >
  25. >Hi,
  26. >
  27. >I have a simple program to dial out via a hayes modem. When run, the
  28. >modem RD and TD lights blink showing that it receives the dial string
  29. >from the program but doesn't really dial out.
  30. >Here is the relevant piece of code. Any help is appreciated.
  31. >Thanks
  32. >
  33. >Atiq
  34. >-------------------------------------
  35.  
  36. [ source deleted ]
  37.  
  38. >main()
  39. >{
  40. >        int tty_fd;
  41. >        tty_fd=open(....)  etc.
  42. >        sttyModem(tty_fd);
  43. >
  44. >        char *str="ATDT91(800)222-3333\r";              //some number
  45. >        char ss[10];
  46. >
  47. >        write(tty_fd, str, strlen(str));
  48. >        read(tty_fd, ss, 1);
  49. >        // other code..........
  50. >        exit(0);
  51. >}
  52.  
  53. I had the same problem a few years ago. 
  54. Some modems don't like receiving an AT command at full speed.
  55. I solved the problem bij sending each character seperate and waiting for the 
  56. output to drain by using the ioctl command.
  57. Change your single write into a loop where each character is written seperately 
  58. followed by ioctl(tty_fd,TCSBRK,1).
  59.  
  60.  
  61. Harry Venema
  62. -- 
  63. ---------------------------------------------------------------------------
  64. Harry Venema                     | VCD Services B.V
  65. email work: harry@vcd.nl         | Osloweg 131
  66.       home: harry@pyrrus.iaf.nl  | 9723 BK Groningen, the Netherlands
  67. #include <stddisclaimer.h>       | Voice +31 50 975500 Fax: +31 50 975597
  68. ---------------------------------------------------------------------------
  69.